package com.translate.web.service.impl;

import com.translate.vo.contract.INvitationRewardsConfVO;
import com.translate.web.dao.NvitationRewardsConfMapper;
import com.translate.entity.NvitationRewardsConf;
import com.translate.web.service.INvitationRewardsConfService;
import com.basic.service.impl.BaseServiceImpl;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

@Service
public class NvitationRewardsConfServiceImpl extends BaseTranslateServiceImpl<NvitationRewardsConf>
		implements INvitationRewardsConfService {
	public NvitationRewardsConfServiceImpl(NvitationRewardsConfMapper mapper) {
		super(mapper);
	}

	protected void insertPropteris(NvitationRewardsConf data) {
		long time = System.currentTimeMillis() / 1000;
		data.setCreateTime(time);
		data.setUpdateTime(time);
	}

	protected void updatePropteris(NvitationRewardsConf data) {
		data.setUpdateTime(System.currentTimeMillis() / 1000);
	}

	protected Class<NvitationRewardsConf> getEntityClass() {
		return NvitationRewardsConf.class;
	}

	@Resource
	public void setRedisTemplate(RedisTemplate<String, ? extends Object> redisTemplate) {
		this.redisTemplate = redisTemplate;
	}
	/**
	 * 获取推荐奖励
	 * 
	 * @return
	 */
	@Override
	public List<NvitationRewardsConf> getRecommendRewardList() {
		return null;
//		return mapper.selectAll();
	}
}
